# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=surgescript
pkgver=0.5.5
pkgrel=0
pkgdesc="scripting language for games"
url="https://docs.opensurge2d.org"
arch="all"
license="Apache-2.0"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/alemart/surgescript/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # No tests.

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
b3b79f36463b9ff91f2f8108d6917961d8aabfbd0693a9e9e275f57faa09022570519c553ceff8db93101058964d76df82448b487ed82c5331598df065fae34a  surgescript-0.5.5.tar.gz
"
